package com.elitel.frame.base.controller;

import com.elitel.frame.base.service.CfgExtsqlLogService;
import com.elitel.frame.main.entity.CfgExtsqlLog;
import com.elitel.frame.main.entity.vo.JsonResult;
import com.github.pagehelper.PageInfo;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

/**
 * sql查询服务操作日志
 */
@Controller
@RequestMapping("/system/cfgextsqllog")
public class CfgExtsqlLogController {

    @Resource
    CfgExtsqlLogService cfgExtsqlLogService;

    /**
     *  获取数据列表
     * @param pageInfo
     * @param cfgExtsqlLog  脚本服务操作记录表
     * @return
     */
    @ResponseBody
    @RequestMapping("/getList")
    public Object getList(PageInfo pageInfo, CfgExtsqlLog cfgExtsqlLog) {
        JsonResult jsonResult = new JsonResult();
        jsonResult.setSuccess(true);
        jsonResult.setData(cfgExtsqlLogService.getList(pageInfo, cfgExtsqlLog));
        return jsonResult;
    }

}
